
/**
 * 采购目录维护下的删除选项
 */

function adf(){
    var id_array = new Array();
    $('input[name=chec]:checked').each(function () {
        id_array.push($(this).val());//向数组中添加元素
    });  //获取界面复选框的所有值
    var id = id_array.join(',');//把复选框的值以数组形式存放
    var v = window.location.href;
    var v1 = v.substring(v.lastIndexOf("?") + 1, v.length);
    $.ajax({
        url: "/myspringboot/purchase/finddelect",
        data: {id: id,v:v1},
        type: "post",
        dataType: "json",
        success: function (result) {
            if (result.msg=="成功") {
                alert("删除成功");
                window.location.reload()//刷新当前页面.
            }else {
                alert("删除失败")
            }
        }
    });
}